package com.slw.caiji.controller;

import com.slw.caiji.Vo.params.PageParams;
import com.slw.caiji.dto.SysIcon;
import com.slw.caiji.service.SysIconService;
import com.slw.caiji.service.SysIconService;
import com.slw.caiji.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/icon")
@Api(tags = "icon管理")
public class SysIconController {
    @Autowired
    private SysIconService sysIconService;

    @PostMapping("list")
    @Operation(summary = "分页获取用户列表", description = "分页获取用户列表")
    public Result getList(@RequestBody PageParams pageParams) {
        return sysIconService.getSysIconList(pageParams);
    }

    @PostMapping("add")
    @Operation(summary = "新增用户", description = "新增用户")
    public Result addIcon(@RequestBody SysIcon sysIcon) {
        return sysIconService.addIcon(sysIcon);
    }

    @GetMapping("del")
    @Operation(summary = "删除用户", description = "删除用户")
    public Result delIcon(@RequestParam String ids) {
        return sysIconService.delIcon(ids);
    }
}
